<template>
	<div class="tar-bar-item" @click="itemClick">
		<slot name="item-icon"></slot>
		<slot name="item-text"></slot>
	</div>
</template>

<script>
	export default {
		name: "TabBarItem",
		props: {
			path: String
		},
		methods: {
			itemClick() {
				this.$router.push(this.path)
			}
		}
	}
</script>


<style scoped>
	.tar-bar-item {
		flex: 1;
		text-align: center;
		height: 49px;
		font-size: 14px;
	}

	.tar-bar-item img {
		width: 24px;
		height: 24px;
		margin-top: 3px;
		vertical-align: middle;
	}
</style>